<template>
  <!-- 全局路由容器 -->
  <div id="app" class="app-container">
    <!-- 路由视图容器 -->
    <router-view :key="$route.fullPath" v-slot="{ Component }">
      <!-- 添加过渡动画 -->
      <transition name="fade" mode="out-in">
        <!-- 保持组件状态避免重复渲染 -->
        <component :is="Component" />
      </transition>
    </router-view>
  </div>
</template>

<script setup>
// 全局样式引入
import 'element-plus/dist/index.css'
</script>

<style scoped>
#app {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
</style>